import { useEffect } from "react";
import "./index.css";

export default function () {
  useEffect(() => {
    document.querySelector("#click").addEventListener("click", function (e) {
      e.preventDefault();
      if (
        window.confirm(
          "您即将离开前程无忧官方招聘网站，前往第三方页面。是否确认前往？"
        )
      ) {
        window.location.href = "http://www.fengcheng-pms.com";
      } else {
        return false;
      }
    });
  }, []);

  return (
    <div className="more-wrapper">
      <div className="more-item more-info">
        <div className="input-out-wrapper">
          <div className="input-in-wrapper">
            <input
              className="input"
              value={"http://www.fengcheng-pms.com"}
              type="text"
              placeholder="http://www.fengcheng-pms.com"
              disabled
            />
            <div className="submit" id="click">
              立即查看
            </div>
          </div>
        </div>
      </div>
    </div>
  );
}
